Skip to content

Conversation

@aidanharan
Copy link
Contributor

@aidanharan aidanharan commented May 2, 2024

  1. Coerce HasManyThroughAssociationsTest#test_associate_existing test as MSSSQL has no release savepoint query.
HasManyThroughAssociationsTest#test_associate_existing [/usr/local/bundle/bundler/gems/rails-087260d0fce3/activerecord/test/cases/associations/has_many_through_associations_test.rb:224]:
2 instead of 3 queries were executed. Queries: SAVE TRANSACTION active_record_1

EXEC sp_executesql N'INSERT INTO [readers] ([post_id], [person_id]) OUTPUT INSERTED.[id] VALUES (@0, @1)', N'@0 int, @1 int', @0 = 2, @1 = 2.
Expected: 3
  Actual: 2

bin/rails test /usr/local/bundle/bundler/gems/rails-087260d0fce3/activerecord/test/cases/associations/has_many_through_associations_test.rb:220

https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/actions/runs/8928362210/job/24523775374

  1. Fixed RelationMergingTest#test_merge_doesnt_duplicate_same_clauses_coerced.

Fix required because of rails/rails#51139

  1. Coerced QueryLogsTest#test_sqlcommenter_format_allows_string_keys and reimplemented.

  2. Fixed SanitizeTest#test_sanitize_sql_like_example_use_case_coerced.

  3. Fixed CalculationsTest#test_count_for_a_composite_primary_key_model_with_includes_and_references. Ported change from Fix count queries on includes+references for models with composite primary keys rails/rails#51655

@aidanharan aidanharan changed the title Coerce test as no query to release savepoint Fixed tests May 4, 2024
@aidanharan aidanharan marked this pull request as ready for review May 8, 2024 20:32
@aidanharan aidanharan merged commit 9849019 into main May 8, 2024
@aidanharan aidanharan deleted the coerce-test-no-release-savepoint branch May 8, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants